#pragma once
#include "Node.h"

class Entity : public Node {
public:
	int x;
	int y;
	int h;
	int last_region_x;
	int last_region_y;
	int entity_index;

	virtual inline int region_x() {
		return x >> 3;
	}
	virtual inline int region_y() {
		return y >> 3;
	}
	virtual inline int small_x() {
		return x - ((last_region_x - 6) << 3);
	}
	virtual inline int small_y() {
		return y - ((last_region_y - 6) << 3);
	}

	virtual inline void set_regions() {
		last_region_x = x >> 3;
		last_region_y = y >> 3;
	}

	Entity() {
	}

	Entity(int _entity_index, int _x, int _y, int _h) {
		entity_index = _entity_index;
		x = _x;
		y = _y;
		_h = h;
		set_regions();
	}

	~Entity(void) {
	}
};
